package com.hwl.demo17;

import com.hwl.demo17.service.HandsetBrand;
import com.hwl.demo17.service.impl.HandsetAddressList;
import com.hwl.demo17.service.impl.HandsetBrandM;
import com.hwl.demo17.service.impl.HandsetBrandN;
import com.hwl.demo17.service.impl.HandsetGame;

/**
 * 桥接模式
 *
 * @author sentry
 * @since 2023-03-25
 */
public class Main {

    public static void main(String[] args) {
        HandsetBrand ab = new HandsetBrandM();
        ab.setSoft(new HandsetGame());
        ab.run();

        ab.setSoft(new HandsetAddressList());
        ab.run();

        HandsetBrand ab2 = new HandsetBrandN();
        ab2.setSoft(new HandsetGame());
        ab2.run();

        ab2.setSoft(new HandsetAddressList());
        ab2.run();
    }
}
